Treat scripts in R/ folder as collated - #1382
Merged
Merged
Conversation
lionel-
force-pushed
the
oak-source/1-r-collation
branch
2 times, most recently
from
August 3, 2026 13:17
d5c46f2 to
1eea55a
Compare
lionel-
force-pushed
the
oak-source/1-r-collation
branch
from
August 3, 2026 16:18
1eea55a to
6070b5b
Compare
lionel-
force-pushed
the
oak-source/1-r-collation
branch
2 times, most recently
from
August 4, 2026 03:56
a81abca to
51ac90e
Compare
lionel-
force-pushed
the
oak-source/1-r-collation
branch
from
August 5, 2026 16:01
b31110d to
cddcd5c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progress towards posit-dev/positron#14790
Progress towards #1338
Files in an
R/folder are now treated in an alphabetical collation, just like in packages. This means they can now see each other's functions.The alphabetical order only matters for top-level expressions (eager context). For lazy contexts (like functions), the symbols resolve to the end-of-collation view, where all symbols from all files are defined.
Goals:
This is not technically needed for the
targets::tar_source()use case which we will support with a more precise mechanism in subsequent PRs.Note that while this allows files in the R/ folder to see each other, this has no effect at the sourcing site, e.g.
tar_source(), or the implicit call toloadSupport()made by Shiny. This is a different side of the problem to be tackled separately.Positron Release Notes
New Features
R/folder are now implicitly treated in an alphabetical collation unless a more precise loading context is determined (go to definition returns no definition found positron#14790). Functions in sibling files can now see each other as long as they are in the sameR/folder. This currently only affects the symbol navigation and renaming features.Bug Fixes